<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">个人信息</div>
                    <div class="widget-function am-fr">
                        <a href="javascript:;" class="am-icon-cog"></a>
                    </div>
                </div>
                <div class="widget-body am-fr">
                    <form class="am-form tpl-form-line-form" id="personalInformationImgForm" method="post"
                          enctype="multipart/form-data">
                        <!--身份证正面照(identity_positive_img)-->
                        <div class="am-form-group">
                            <label for="identityPositiveImg" class="am-u-sm-2 am-form-label">身份证正面照
                                <span class="tpl-form-line-small-title">identityPositiveImg</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFile" type="file"/>
                                <input id="identityPositiveImg" type="hidden" name="identityPositiveImg"/>
                            </div>
                        </div>
                        <!--身份证号(identity_num)-->
                        <div class="am-form-group">
                            <label for="identityNum" class="am-u-sm-2 am-form-label">身份证号
                                <span class="tpl-form-line-small-title">identityNum</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="identityNum" class="tpl-form-input" placeholder="请输入"
                                       name="identityNum"/>
                            </div>
                        </div>
                        <!--身份证背面照(identity_opposite_img)-->
                        <div class="am-form-group">
                            <label for="identityOppositeImg" class="am-u-sm-2 am-form-label">身份证背面照
                                <span class="tpl-form-line-small-title">identityOppositeImg</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileOne" type="file"/>
                                <input id="identityOppositeImg" type="hidden" name="identityOppositeImg"/>
                            </div>
                        </div>
                        <!--个人彩照(portrait)-->
                        <div class="am-form-group">
                            <label for="portrait" class="am-u-sm-2 am-form-label">个人彩照
                                <span class="tpl-form-line-small-title">portrait</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileTwo" type="file"/>
                                <input id="portrait" type="hidden" name="portrait"/>
                            </div>
                        </div>
                        <!--结婚证照片(marriage_certificate)-->
                        <div class="am-form-group">
                            <label for="marriageCertificate" class="am-u-sm-2 am-form-label">结婚证照片
                                <span class="tpl-form-line-small-title">marriageCertificate</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileThree" type="file"/>
                                <input id="marriageCertificate" type="hidden" name="marriageCertificate"/>
                            </div>
                        </div>
                        <!--本人户口簿个人资料页照片(household_register_img)-->
                        <div class="am-form-group">
                            <label for="householdRegisterImg" class="am-u-sm-2 am-form-label">本人户口簿个人资料页照片
                                <span class="tpl-form-line-small-title">householdRegisterImg</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileFour" type="file"/>
                                <input id="householdRegisterImg" type="hidden" name="householdRegisterImg"/>
                            </div>
                        </div>
                        <!--配偶户口簿资个人资料页照片(household_spouse_img)-->
                        <div class="am-form-group">
                            <label for="householdSpouseImg" class="am-u-sm-2 am-form-label">配偶户口簿资个人资料页照片
                                <span class="tpl-form-line-small-title">householdSpouseImg</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileFive" type="file"/>
                                <input id="householdSpouseImg" type="hidden" name="householdSpouseImg"/>
                            </div>
                        </div>
                        <!--配偶或代理人身份证正面照片(other_identity_positive)-->
                        <div class="am-form-group">
                            <label for="otherIdentityPositive" class="am-u-sm-2 am-form-label">配偶或代理人身份证正面照片
                                <span class="tpl-form-line-small-title">otherIdentityPositive</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileSix" type="file"/>
                                <input id="otherIdentityPositive" type="hidden" name="otherIdentityPositive"/>
                            </div>
                        </div>
                        <!--配偶或代理人身份证背面照片(other_identity_opposite)-->
                        <div class="am-form-group">
                            <label for="otherIdentityOpposite" class="am-u-sm-2 am-form-label">配偶或代理人身份证背面照片
                                <span class="tpl-form-line-small-title">otherIdentityOpposite</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input id="upFileSenven" type="file"/>
                                <input id="otherIdentityOpposite" type="hidden" name="otherIdentityOpposite"/>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <div class="am-u-sm-10 am-u-sm-push-2">

                                <button type="button" onclick="return doSubmit();"
                                        class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交
                                </button>
                                <button type="button" onclick="loadPage('personalInformationImg/listUI')"
                                        class="am-btn am-btn-success tpl-btn-bg-color-success ">返回
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:inline="javascript">
    <![CDATA[
    //$('select').selected();
    validateUserForm();

    function validateUserForm() {
        valdater = $('#personalInformationImgForm').validate({
            errorElement: 'span',
            errorClass: 'am-icon-times',
            focusInvalid: true,
            onkeyup: false,
            ignore: "",
            rules: {
                title: {
                    required: true
                }
            },
            messages: {
                name: {
                    required: "请填写标题"
                }
            }
        });
    }

    function doSubmit() {
        if (valdater.form()) {
            commit('personalInformationImgForm', 'personalInformationImg/save', 'personalInformationImg/listUI');
            return true;
        }
        return false;
    }
    initUpFileOne('upFile', 'identityPositiveImg', '身份证正面照', '');
    initUpFileOne('upFileOne', 'identityOppositeImg', '身份证背面照', '');
    initUpFileOne('upFileTwo', 'portrait', '个人彩照', '');
    initUpFileOne('upFileThree', 'marriageCertificate', '结婚证照片', '');
    initUpFileOne('upFileFour', 'householdRegisterImg', '本人户口簿个人资料页照片', '');
    initUpFileOne('upFileFive', 'householdSpouseImg', '配偶户口簿资个人资料页照片', '');
    initUpFileOne('upFileSix', 'otherIdentityPositive', '配偶或代理人身份证背面照片', '');
    initUpFileOne('upFileSenven', 'otherIdentityOpposite', '配偶或代理人身份证背面照片', '');
    ]]>
</script>
<script type="text/javascript" th:src="@{/My97DatePicker/WdatePicker.js}"/>